<?php

use Monolog\Handler\NullHandler;

return [
    /*
    |--------------------------------------------------------------------------
    | Default Log Channel
    |--------------------------------------------------------------------------
    |
    | This option defines the default log channel that gets used when writing
    | messages to the logs. The name specified in this option should match
    | one of the channels defined in the "channels" configuration array.
    |
    */

    'default' => env('LOG_CHANNEL', 'stack'),

    /*
    |--------------------------------------------------------------------------
    | Log Channels
    |--------------------------------------------------------------------------
    |
    | Here you may configure the log channels for your application. Out of
    | the box, Laravel uses the Monolog PHP logging library. This gives
    | you a variety of powerful log handlers / formatters to utilize.
    |
    | Available Drivers: "single", "daily", "slack", "syslog",
    |                    "errorlog", "monolog",
    |                    "custom", "stack"
    |
    */

    'channels' => [
        'stack' => [
            'driver' => 'stack',
            'channels' => ['daily'],
            'ignore_exceptions' => false,
        ],

        'single' => [
            'driver' => 'single',
            'path' => storage_path('logs/laravel.log'),
            'level' => 'debug',
        ],

        'daily' => [
            'driver' => 'daily',
            'path' => storage_path('logs/default.log'),
            'level' => 'debug',
            'days' => 14,
        ],
        'wallet' => [
            'driver' => 'daily',
            'path' => storage_path('logs/wallet.log'),
            'level' => 'debug',
            'days' => 14,
        ],
        \App\Constant::LOG_CHANNEL_YEEPAY => [
            'driver' => 'daily',
            'path' => storage_path('logs/yeepay.log'),
            'level' => 'debug',
            'days' => 14,
        ],
        \App\Constant::LOG_CHANNEL_ADAPAY => [
            'driver' => 'daily',
            'path' => storage_path('logs/adapay.log'),
            'level' => 'debug',
            'days' => 14,
        ],
        \App\Constant::LOG_CHANNEL_SDPAY => [
            'driver' => 'daily',
            'path' => storage_path('logs/sdpay.log'),
            'level' => 'debug',
            'days' => 14,
        ],
        \App\Constant::LOG_CHANNEL_REGISTRY => [
            'driver' => 'daily',
            'path' => storage_path('logs/registry.log'),
            'level' => 'debug',
            'days' => 14,
        ],
        \App\Constant::LOG_CHANNEL_ACCESS => [
            'driver' => 'daily',
            'path' => storage_path('logs/access.log'),
            'level' => 'debug',
            'days' => 14,
        ],
        \App\Constant::LOG_CHANNEL_XUNCHENG => [
            'driver' => 'daily',
            'path' => storage_path('logs/xuncheng.log'),
            'level' => 'debug',
            'days' => 14,
        ],
        \App\Constant::LOG_CHANNEL_HEZHI => [
            'driver' => 'daily',
            'path' => storage_path('logs/hezhi.log'),
            'level' => 'debug',
            'days' => 14,
        ],
        \App\Constant::LOG_CHANNEL_XMETA => [
            'driver' => 'daily',
            'path' => storage_path('logs/xmeta.log'),
            'level' => 'debug',
            'days' => 14,
        ],
        \App\Constant::LOG_CHANNEL_DINGBLOCK => [
            'driver' => 'daily',
            'path' => storage_path('logs/dingblock.log'),
            'level' => 'debug',
            'days' => 14,
        ],
        \App\Constant::LOG_CHANNEL_HJS => [
            'driver' => 'daily',
            'path' => storage_path('logs/hjs.log'),
            'level' => 'debug',
            'days' => 14,
        ],
        \App\Constant::LOG_CHANNEL_TZS => [
            'driver' => 'daily',
            'path' => storage_path('logs/tzs.log'),
            'level' => 'debug',
            'days' => 14,
        ],
        'sql-logger' => [
            'driver' => 'daily',
            'path' => storage_path('logs/sql.log'),
            'level' => 'debug',
            'days' => 14,
        ],
        'slow-sql-logger' => [
            'driver' => 'daily',
            'path' => storage_path('logs/slow-sql.log'),
            'level' => 'debug',
            'days' => 14,
        ],

        'syslog' => [
            'driver' => 'syslog',
            'level' => 'debug',
        ],

        'errorlog' => [
            'driver' => 'errorlog',
            'level' => 'debug',
        ],

        'null' => [
            'driver' => 'monolog',
            'handler' => NullHandler::class,
        ],

        'emergency' => [
            'path' => storage_path('logs/emergency.log'),
        ],
    ],
];
